<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core_rt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f"%>
<%@ taglib uri="/mytag" prefix="yjd"%>
<div class="wrap J_check_wrap">

	<div class="nav">
		<ul class="cc">
		<li  class='current'><a href='<yjd:url url="/merchant/app/all"/>'>查询版本</a></li>
		<li ><a href='<yjd:url url="/merchant/app/to/upload"/>' >发布新版本</a></li>
		</ul>
	</div>

	<div class="h_a">搜索</div>
	<div class="search_type cc mb10">
		<form action='<yjd:url url="/merchant/app/all"/>' method="get" autocomplete="off">
			<label>设备：</label>
			<select name="device_type" class="mr10">
				<option value="">全部</option>
				<option value="android" <c:if test="${maps.device_type=='android' }">  selected="selected" </c:if>  >Android</option>
				<option value="ios" <c:if test="${maps.device_type=='ios'}">  selected="selected" </c:if>  >IOS</option>
			</select> 
			<button type="submit" class="btn btn_submit length_1">搜索</button>
		</form>
	</div>

	<div class="table_list">
		<table width="100%">
			<thead>
			<tr>
				<td >ID</td>
				<td >设备类型</td>
				<td >数据包名称</td>
				<td >APP版本</td>
				<td >下载地址</td>
				<td >状态</td>
				<td >强制更新</td>
				<td >更新内容</td>
				<td >添加时间</td>
				<td >更新时间</td>
				<td >操作</td>
			</tr>
			</thead>
			<tbody>
			<c:forEach items="${pager.pagerModel.dataList  }" var="item">
				<tr>
					<td>${item.id }</td>
					<td>${item.device_type }</td>
					<td>${item.package_name }</td>
					<td>${item.app_version }</td>
					<td>${item.url }</td>
					<td><c:if test="${item.status==0 }">使用中</c:if>
						<c:if test="${item.status!=0 }">非使用中</c:if>
					</td>
					<td><c:if test="${item.force_update==0 }">否</c:if>
						<c:if test="${item.force_update==1 }">是</c:if>
					</td>
					<td><div style="width:300px; white-space:nowrap;text-overflow:ellipsis;overflow:hidden; " title="${item.update_msg }" >${item.update_msg }</div></td>
					<td>${item.strMap.create_time }</td>
					<td>${item.strMap.last_update_time }</td>

					<td>
						<c:if test="${item.status!=0 }">
							<a class="btn btn_green J_ajax_del" data-msg="确定启用该版本？" href='<yjd:url url="/merchant/app/version/active"/>?id=${item.id }&device_type=${item.device_type }' id="J_ajax_del_${item.id }">启用</a>
						</c:if>
						<c:if test="${item.status==0 }">
							<a class="btn btn_submit J_ajax_del" data-msg="确定禁用该版本？" href='<yjd:url url="/merchant/app/version/inactive"/>?id=${item.id }' id="J_ajax_del_${item.id }">禁用</a>
						</c:if>
					</td>
				</tr>
			</c:forEach>
			</tbody>
		</table>
	</div>
</div>